|
2000W / 48V LLC Battery-Charger
V1.00
|
Inter Integrated Circuit(IIC) driver for the XMC microcontroller family. More...
|
Classes | |
| struct | XMC_I2C_CH_CONFIG |
| I2C_CH configuration structure. More... | |
Macros | |
| #define | XMC_I2C_10BIT_ADDR_GROUP (0x7800U) |
Typedefs | |
| typedef enum XMC_I2C_CH_STATUS | XMC_I2C_CH_STATUS_t |
| I2C Status. More... | |
| typedef enum XMC_I2C_CH_STATUS_FLAG | XMC_I2C_CH_STATUS_FLAG_t |
| I2C status. More... | |
| typedef enum XMC_I2C_CH_RECEIVER_STATUS_FLAG | XMC_I2C_CH_RECEIVER_STATUS_FLAG_t |
| I2C receiver status. The received data byte is available at the bit positions RBUF[7:0], whereas the additional information is monitored at the bit positions RBUF[12:8]. More... | |
| typedef enum XMC_I2C_CH_CMD | XMC_I2C_CH_CMD_t |
| I2C commands. More... | |
| typedef enum XMC_I2C_CH_EVENT | XMC_I2C_CH_EVENT_t |
| I2C events. More... | |
| typedef enum XMC_I2C_CH_INPUT | XMC_I2C_CH_INPUT_t |
| I2C input stage selection. More... | |
| typedef enum XMC_I2C_CH_INTERRUPT_NODE_POINTER | XMC_I2C_CH_INTERRUPT_NODE_POINTER_t |
| typedef struct XMC_I2C_CH_CONFIG | XMC_I2C_CH_CONFIG_t |
| I2C_CH configuration structure. More... | |
Inter Integrated Circuit(IIC) driver for the XMC microcontroller family.
USIC IIC Features:
| #define XMC_I2C_10BIT_ADDR_GROUP (0x7800U) |
| typedef enum XMC_I2C_CH_CMD XMC_I2C_CH_CMD_t |
I2C commands.
| typedef struct XMC_I2C_CH_CONFIG XMC_I2C_CH_CONFIG_t |
I2C_CH configuration structure.
| typedef enum XMC_I2C_CH_EVENT XMC_I2C_CH_EVENT_t |
I2C events.
| typedef enum XMC_I2C_CH_INPUT XMC_I2C_CH_INPUT_t |
I2C input stage selection.
I2C channel interrupt node pointers
I2C receiver status. The received data byte is available at the bit positions RBUF[7:0], whereas the additional information is monitored at the bit positions RBUF[12:8].
| typedef enum XMC_I2C_CH_STATUS_FLAG XMC_I2C_CH_STATUS_FLAG_t |
I2C status.
| typedef enum XMC_I2C_CH_STATUS XMC_I2C_CH_STATUS_t |
I2C Status.
| enum XMC_I2C_CH_CMD |
| enum XMC_I2C_CH_EVENT |
I2C events.
| enum XMC_I2C_CH_INPUT |
I2C channel interrupt node pointers
I2C receiver status. The received data byte is available at the bit positions RBUF[7:0], whereas the additional information is monitored at the bit positions RBUF[12:8].
| enum XMC_I2C_CH_STATUS |
I2C status.
| __STATIC_INLINE void XMC_I2C_CH_ClearStatusFlag | ( | XMC_USIC_CH_t *const | channel, |
| uint32_t | flag | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| flag | Status flag |
Definition at line 676 of file xmc_i2c.h.
Referenced by XMC_I2C_CH_MasterReceiveAck(), XMC_I2C_CH_MasterReceiveNack(), XMC_I2C_CH_MasterStop(), XMC_I2C_CH_MasterTransmit(), and XMC_I2C_CH_SlaveTransmit().

| __STATIC_INLINE void XMC_I2C_CH_ConfigExternalInputSignalToBRG | ( | XMC_USIC_CH_t *const | channel, |
| const uint16_t | pdiv, | ||
| const uint32_t | oversampling, | ||
| const XMC_USIC_CH_INPUT_COMBINATION_MODE_t | combination_mode | ||
| ) |
| channel | Pointer to USIC channel handler of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
| pdiv | Desired divider for the external frequency input. Range: minimum value = 1, maximum value = 1024 |
| oversampling | Required oversampling. The value indicates the number of time quanta for one symbol of data. This can be related to the number of samples for each logic state of the data signal. Range: 1 to 32. Value should be chosen based on the protocol used. |
| combination_mode | USIC channel input combination mode |
Definition at line 699 of file xmc_i2c.h.

| __STATIC_INLINE void XMC_I2C_CH_DisableAcknowledgeAddress0 | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| __STATIC_INLINE void XMC_I2C_CH_DisableDataTransmission | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel handle of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
Definition at line 769 of file xmc_i2c.h.

| void XMC_I2C_CH_DisableEvent | ( | XMC_USIC_CH_t *const | channel, |
| uint32_t | event | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| event | ORed values of XMC_I2C_CH_EVENT_t enum |
| __STATIC_INLINE void XMC_I2C_CH_DisableMasterClock | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | A constant pointer to XMC_USIC_CH_t, pointing to the USIC channel base address. |
| __STATIC_INLINE void XMC_I2C_CH_EnableAcknowledgeAddress0 | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| __STATIC_INLINE void XMC_I2C_CH_EnableDataTransmission | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel handle of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
Definition at line 751 of file xmc_i2c.h.

| void XMC_I2C_CH_EnableEvent | ( | XMC_USIC_CH_t *const | channel, |
| uint32_t | event | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| event | ORed values of XMC_I2C_CH_EVENT_t enum |
| __STATIC_INLINE void XMC_I2C_CH_EnableMasterClock | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | A constant pointer to XMC_USIC_CH_t, pointing to the USIC channel base address. |
| uint8_t XMC_I2C_CH_GetReceivedData | ( | const XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| __STATIC_INLINE uint8_t XMC_I2C_CH_GetReceiverStatusFlag | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| uint16_t XMC_I2C_CH_GetSlaveAddress | ( | const XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel handler of type XMC_USIC_CH_t |
| __STATIC_INLINE uint32_t XMC_I2C_CH_GetStatusFlag | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| void XMC_I2C_CH_Init | ( | XMC_USIC_CH_t *const | channel, |
| const XMC_I2C_CH_CONFIG_t *const | config | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| config | Constant pointer to I2C channel config structure of type XMC_I2C_CH_CONFIG_t |
| void XMC_I2C_CH_MasterReceiveAck | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
Definition at line 316 of file xmc_i2c.c.

| void XMC_I2C_CH_MasterReceiveNack | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
Definition at line 338 of file xmc_i2c.c.

| void XMC_I2C_CH_MasterRepeatedStart | ( | XMC_USIC_CH_t *const | channel, |
| const uint16_t | addr, | ||
| const XMC_I2C_CH_CMD_t | command | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| addr | I2C master address |
| command | read/write command |
| void XMC_I2C_CH_MasterStart | ( | XMC_USIC_CH_t *const | channel, |
| const uint16_t | addr, | ||
| const XMC_I2C_CH_CMD_t | command | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| addr | I2C master address |
| command | read/write command |
| void XMC_I2C_CH_MasterStop | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
Definition at line 250 of file xmc_i2c.c.

| void XMC_I2C_CH_MasterTransmit | ( | XMC_USIC_CH_t *const | channel, |
| const uint8_t | data | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| data | data to transmit from I2C channel |
Definition at line 272 of file xmc_i2c.c.

| __STATIC_INLINE void XMC_I2C_CH_SelectInterruptNodePointer | ( | XMC_USIC_CH_t *const | channel, |
| const XMC_I2C_CH_INTERRUPT_NODE_POINTER_t | interrupt_node, | ||
| const uint32_t | service_request | ||
| ) |
| channel | Pointer to USIC channel handler of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
| interrupt_node | Interrupt node pointer to be configured. Range: XMC_I2C_CH_INTERRUPT_NODE_POINTER_TRANSMIT_SHIFT, XMC_I2C_CH_INTERRUPT_NODE_POINTER_TRANSMIT_BUFFER etc. |
| service_request | Service request number. Range: 0 to 5. |
Definition at line 387 of file xmc_i2c.h.

| XMC_I2C_CH_STATUS_t XMC_I2C_CH_SetBaudrate | ( | XMC_USIC_CH_t *const | channel, |
| const uint32_t | rate | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| rate | baud rate of I2C channel |
Definition at line 162 of file xmc_i2c.c.

| __STATIC_INLINE void XMC_I2C_CH_SetInputSource | ( | XMC_USIC_CH_t *const | channel, |
| const XMC_I2C_CH_INPUT_t | input, | ||
| const uint8_t | source | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| input | I2C channel input stage of type XMC_I2C_CH_INPUT_t |
| source | Input source select for the input stage(0->DX0A, 1->DX1A, .. 7->DX7G) |
Definition at line 431 of file xmc_i2c.h.

| __STATIC_INLINE void XMC_I2C_CH_SetInterruptNodePointer | ( | XMC_USIC_CH_t *const | channel, |
| const uint8_t | service_request | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| service_request | Service request number in the range of 0-5 |
Definition at line 361 of file xmc_i2c.h.

| void XMC_I2C_CH_SetSlaveAddress | ( | XMC_USIC_CH_t *const | channel, |
| const uint16_t | address | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| address | I2C slave address |
| void XMC_I2C_CH_SlaveTransmit | ( | XMC_USIC_CH_t *const | channel, |
| const uint8_t | data | ||
| ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| data | data to transmit from I2C channel |
Definition at line 294 of file xmc_i2c.c.

| __STATIC_INLINE void XMC_I2C_CH_Start | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
Definition at line 322 of file xmc_i2c.h.

| XMC_I2C_CH_STATUS_t XMC_I2C_CH_Stop | ( | XMC_USIC_CH_t *const | channel | ) |
| channel | Constant pointer to USIC channel structure of type XMC_USIC_CH_t |
| __STATIC_INLINE void XMC_I2C_CH_TriggerServiceRequest | ( | XMC_USIC_CH_t *const | channel, |
| const uint32_t | service_request_line | ||
| ) |
| channel | Pointer to USIC channel handler of type XMC_USIC_CH_t Range: XMC_I2C0_CH0, XMC_I2C0_CH1,XMC_I2C1_CH0,XMC_I2C1_CH1,XMC_I2C2_CH0,XMC_I2C2_CH1 |
| service_request_line | service request number of the event to be triggered. Range: 0 to 5. |
Definition at line 410 of file xmc_i2c.h.
